//
//  ChatRoomViewController.m
//  used
//
//  Created by lanou on 16/7/26.
//  Copyright © 2016年 王凯. All rights reserved.
//

#import "ChatRoomViewController.h"

@interface ChatRoomViewController ()
@end

@implementation ChatRoomViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    if (self.name == nil) {
        self.navigationController.title = @"消息";
    }else {
    self.navigationItem.title = self.name;
    }
    self.view.backgroundColor = KLRGBColor(240, 240, 240);
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(leftAction:)];
    // Do any additional setup after loading the view.
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    //标签栏隐藏,防止遮住输入控件
    self.navigationController.tabBarController.tabBar.hidden = YES;
}

- (void)leftAction:(UIBarButtonItem *) sender {
    
    [self dismissViewControllerAnimated:YES completion:nil];
    [self.navigationController popViewControllerAnimated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end

